home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJLSR200.ZIP / src / libc / posix / sys / stat / fixpath.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  754 b   |  33 lines

  1. @node _fixpath, file system
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <sys/stat.h>
  6.  
  7. void _fixpath(const char *in_path, char *out_path);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function canonacalizes the input path @var{in_path} and stores the
  13. result in the buffer pointed to by @var{out_path}.
  14.  
  15. The path is fixed by removing consecutive and trailing slashes, making
  16. the path absolute if it's relative, removing "." components, collapsing
  17. ".." components, adding a drive specifier if needed, and converting all
  18. slashes to '/'. 
  19.  
  20. @subheading Return Value
  21.  
  22. None.
  23.  
  24. @subheading Example
  25.  
  26. @example
  27. char oldpath[100], newpath[100];
  28. scanf(oldpath);
  29. _fixpath(oldpath, newpath);
  30. printf("that really is %s\n", newpath);
  31. @end example
  32.  
  33.